package com.example.summer_pro.service.Impl;

import com.example.summer_pro.dao.NormalDao;
import com.example.summer_pro.entity.Normal;
import com.example.summer_pro.entity.NormalsJSON;
import com.example.summer_pro.service.NormalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class NormalServiceImpl implements NormalService {

    @Autowired
    private NormalDao normalDao;

    @Override
    public void addNewNormal(Normal normal) {
        normalDao.addNewNormal(normal);
    }

    @Override
    public void updateNormal(Normal normal) {
        normalDao.updateNormal(normal);
    }

    @Override
    public void deleteNormal(Normal normal) {
        normalDao.deleteNormal(normal);
    }

    @Override
    public void deleteAllNormal(Integer q_id) {
        normalDao.deleteAllNormal(q_id);
    }

    @Override
    public Normal selectNormal(Integer q_id, Integer t_id) {
        return normalDao.selectNormal(q_id,t_id);
    }

    @Override
    public void addJson(Integer q_id, String json) {
        normalDao.addJson(q_id, json);
    }

    @Override
    public void deleteJson(Integer q_id) {
        normalDao.deleteJson(q_id);
    }

    @Override
    public NormalsJSON selectJson(Integer q_id) {
        return normalDao.selectJson(q_id);
    }

    @Override
    public void addJsonContent(Integer q_id, String json) {
        normalDao.addJsonContent(q_id,json);
    }

}
